package com.kgc.store.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kgc.basic.annotation.DetailEntity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 入库单
 */
public class InStore implements Serializable {
    @ExcelIgnore
    private Integer id;
    @ExcelProperty("入库单据编号")
    private String code;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelIgnore
    private Date orderDate;
    @ExcelProperty("入库单源单号")
    private String sourceCode;
    @ExcelIgnore
    private Integer pid;
    @ExcelProperty("供应商")
    private String providerName;
    @ExcelIgnore
    private Integer deptId;
    @ExcelProperty("部门")
    private String deptName;
    @ExcelIgnore
    private Integer businessmanId;
    @ExcelProperty("业务员")
    private String businessmanName;
    @ExcelProperty("单据状态")
    private Integer orderStatus;
    @ExcelIgnore
    private Integer storeManId;
    @ExcelProperty("库管员")
    private String storeManName;
    @ExcelIgnore
    private Integer typeId;
    @ExcelProperty("业务类型")
    private String typeName;
    @ExcelIgnore
    private Integer orderTypeId;
    @ExcelProperty("入库总成本")
    private BigDecimal inStoreSumPrice;
    @ExcelIgnore
    private Integer isDelete;
    @ExcelIgnore
    private Integer createId;
    @ExcelProperty("创建人")
    private String createName;

    @ExcelIgnore
    @DetailEntity(detailClass = InStoreDetail.class, relationField = "inStoreCode")
    private List<InStoreDetail> details;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelIgnore
    private Date createDate;
    @ExcelIgnore
    private Integer updateId;
    @ExcelProperty("修改人")
    private String updateName;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelIgnore
    private Date updateDate;

    public List<InStoreDetail> getDetails() {
        return details;
    }

    public void setDetails(List<InStoreDetail> details) {
        this.details = details;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public String getSourceCode() {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getProviderName() {
        return providerName;
    }

    public void setProviderName(String providerName) {
        this.providerName = providerName;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Integer getBusinessmanId() {
        return businessmanId;
    }

    public void setBusinessmanId(Integer businessmanId) {
        this.businessmanId = businessmanId;
    }

    public String getBusinessmanName() {
        return businessmanName;
    }

    public void setBusinessmanName(String businessmanName) {
        this.businessmanName = businessmanName;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Integer getOrderTypeId() {
        return orderTypeId;
    }

    public void setOrderTypeId(Integer orderTypeId) {
        this.orderTypeId = orderTypeId;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Integer updateId) {
        this.updateId = updateId;
    }

    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public BigDecimal getInStoreSumPrice() {
        return inStoreSumPrice;
    }

    public void setInStoreSumPrice(BigDecimal inStoreSumPrice) {
        this.inStoreSumPrice = inStoreSumPrice;
    }


    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getStoreManId() {
        return storeManId;
    }

    public void setStoreManId(Integer storeManId) {
        this.storeManId = storeManId;
    }

    public String getStoreManName() {
        return storeManName;
    }

    public void setStoreManName(String storeManName) {
        this.storeManName = storeManName;
    }


    @Override
    public String toString() {
        return "InStore{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", orderDate=" + orderDate +
                ", sourceCode='" + sourceCode + '\'' +
                ", pid=" + pid +
                ", providerName='" + providerName + '\'' +
                ", deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", businessmanId=" + businessmanId +
                ", businessmanName='" + businessmanName + '\'' +
                ", orderStatus=" + orderStatus +
                ", storeManId=" + storeManId +
                ", storeManName='" + storeManName + '\'' +
                ", typeId=" + typeId +
                ", typeName='" + typeName + '\'' +
                ", orderTypeId=" + orderTypeId +
                ", inStoreSumPrice=" + inStoreSumPrice +
                ", isDelete=" + isDelete +
                ", createId=" + createId +
                ", createName='" + createName + '\'' +
                ", createDate=" + createDate +
                ", updateId=" + updateId +
                ", updateName='" + updateName + '\'' +
                ", updateDate=" + updateDate +
                '}';
    }
}
